package com.ruoyi.slope.video.drone.service.impl;

import java.util.List;

import com.ruoyi.common.annotation.DataScope;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.slope.video.drone.mapper.SlopeDroneInfoMapper;
import com.ruoyi.slope.video.drone.domain.SlopeDroneInfo;
import com.ruoyi.slope.video.drone.service.ISlopeDroneInfoService;

/**
 * 无人机图像Service业务层处理
 * 
 * @author psy
 * @date 2025-04-25
 */
@Service
public class SlopeDroneInfoServiceImpl implements ISlopeDroneInfoService 
{
    @Autowired
    private SlopeDroneInfoMapper slopeDroneInfoMapper;

    /**
     * 查询无人机图像
     * 
     * @param id 无人机图像主键
     * @return 无人机图像
     */
    @Override
    public SlopeDroneInfo selectSlopeDroneInfoById(Long id)
    {
        return slopeDroneInfoMapper.selectSlopeDroneInfoById(id);
    }

    /**
     * 查询无人机图像列表
     * 
     * @param slopeDroneInfo 无人机图像
     * @return 无人机图像
     */
    @DataScope(deptAlias = "s")
    @Override
    public List<SlopeDroneInfo> selectSlopeDroneInfoList(SlopeDroneInfo slopeDroneInfo)
    {
        return slopeDroneInfoMapper.selectSlopeDroneInfoList(slopeDroneInfo);
    }

    /**
     * 新增无人机图像
     * 
     * @param slopeDroneInfo 无人机图像
     * @return 结果
     */
    @Override
    public int insertSlopeDroneInfo(SlopeDroneInfo slopeDroneInfo)
    {
        slopeDroneInfo.setCreateTime(DateUtils.getNowDate());
        return slopeDroneInfoMapper.insertSlopeDroneInfo(slopeDroneInfo);
    }

    /**
     * 修改无人机图像
     * 
     * @param slopeDroneInfo 无人机图像
     * @return 结果
     */
    @Override
    public int updateSlopeDroneInfo(SlopeDroneInfo slopeDroneInfo)
    {
        slopeDroneInfo.setUpdateTime(DateUtils.getNowDate());
        return slopeDroneInfoMapper.updateSlopeDroneInfo(slopeDroneInfo);
    }

    /**
     * 批量删除无人机图像
     * 
     * @param ids 需要删除的无人机图像主键
     * @return 结果
     */
    @Override
    public int deleteSlopeDroneInfoByIds(Long[] ids)
    {
        return slopeDroneInfoMapper.deleteSlopeDroneInfoByIds(ids);
    }

    /**
     * 删除无人机图像信息
     * 
     * @param id 无人机图像主键
     * @return 结果
     */
    @Override
    public int deleteSlopeDroneInfoById(Long id)
    {
        return slopeDroneInfoMapper.deleteSlopeDroneInfoById(id);
    }
}
